using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;


namespace GameFirst
{
    public class Opzioni : Microsoft.Xna.Framework.DrawableGameComponent
    {
        #if WINDOWS
        Texture2D sfondoOpz800600;
        Texture2D sfondoOpz1024768;
        Texture2D sfondoOpz12801024;
        #elif WINDOWS_PHONE
        Texture2D sfondoOpz;
        #endif
        Texture2D mirino;
        Texture2D pallina;
        Texture2D dx;
        Texture2D dxs;
        Texture2D sx;
        Texture2D sxs;
        Texture2D back;
        Texture2D backs;
        SoundEffect song;
        SoundEffectInstance songI;
        bool dx1;
        bool sx1;
        bool dx2;
        bool sx2;
        bool dx3;
        bool sx3;
        bool bk;

        SpriteBatch spriteBatch;
        public Opzioni(Game game)
            : base(game)
        {
            
            dx1 = false;
            sx1 = false;
            dx2 = false;
            sx2 = false;
            dx3 = false;
            sx3 = false;
            bk = false;

        }

        public override void Initialize()
        {

            base.Initialize();
        }


        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            #if WINDOWS
            sfondoOpz800600 = Game.Content.Load<Texture2D>("opzioni menù800600");
            sfondoOpz1024768 = Game.Content.Load<Texture2D>("opzioni menù1024768");
            sfondoOpz12801024 = Game.Content.Load<Texture2D>("opzioni menù12801024");
            #elif WINDOWS_PHONE
            sfondoOpz = Game.Content.Load<Texture2D>("opzioni menùphone");
            #endif
            mirino = Game.Content.Load<Texture2D>("mirino");
            pallina = Game.Content.Load<Texture2D>("pallina");
            dx = Game.Content.Load<Texture2D>("opzionidx");
            dxs = Game.Content.Load<Texture2D>("opzionidxS");
            sx = Game.Content.Load<Texture2D>("opzionisx");
            sxs = Game.Content.Load<Texture2D>("opzionisxS");
            back = Game.Content.Load<Texture2D>("back");
            backs = Game.Content.Load<Texture2D>("backs");

            song = Game.Content.Load<SoundEffect>("menu");
            songI = song.CreateInstance();
            songI.IsLooped = true;
            base.LoadContent();
        }
        public override void Update(GameTime gameTime)
        {
            //AUDIO OPZIONI
            songI.Volume = menucomp.SongVol;
            if (songI.State != SoundState.Playing)
                songI.Play();

            dx1 = false;
            sx1 = false;
            dx2 = false;
            sx2 = false;
            dx3 = false;
            sx3 = false;
            bk = false;
            //back
            if ((InputManagerG.InputManagerGame.GetState().mouseX < ((int)(GraphicsDevice.Viewport.Width / 42.5f) + (int)(GraphicsDevice.Viewport.Width / 3.5f))) && (InputManagerG.InputManagerGame.GetState().mouseX > ((int)(GraphicsDevice.Viewport.Width / 42.5f))))
            {
                if ((InputManagerG.InputManagerGame.GetState().mouseY < (GraphicsDevice.Viewport.Height / 2 + (int)(GraphicsDevice.Viewport.Height / 2.8f) + GraphicsDevice.Viewport.Height / 2)) && (InputManagerG.InputManagerGame.GetState().mouseY > (GraphicsDevice.Viewport.Height / 2 + (int)(GraphicsDevice.Viewport.Height / 2.8f))))
                {
                    bk = true;
                    
                    if (InputManagerG.InputManagerGame.GetState().click)
                    {
                        songI.Stop();
                        while (Game.Components.Count > 0)
                        {
                            ((GameComponent)Game.Components[0]).Dispose();
                        }

                        Game.Components.Clear();

                        Game.Components.Add(new menu(Game));
                        Game.Components.Add(new InputManagerG.InputManagerGame(Game));
                    }
                }
            }
            if ((InputManagerG.InputManagerGame.GetState().mouseX < ((GraphicsDevice.Viewport.Width - GraphicsDevice.Viewport.Width / 4) + (int)(GraphicsDevice.Viewport.Width /7.0f))) && (InputManagerG.InputManagerGame.GetState().mouseX > GraphicsDevice.Viewport.Width - GraphicsDevice.Viewport.Width / 4))
            {
                 #if WINDOWS
                //dx risoluzione
                if ((InputManagerG.InputManagerGame.GetState().mouseY < ((int)(GraphicsDevice.Viewport.Height / 1.45f) + (int)(GraphicsDevice.Viewport.Height / 5.3f))) && (InputManagerG.InputManagerGame.GetState().mouseY > ((int)(GraphicsDevice.Viewport.Height / 1.45f))))
                {
                    dx3 = true;
                    if (InputManagerG.InputManagerGame.GetState().click)
                    {
                        if ((GraphicsDevice.Viewport.Width == 1024) && (GraphicsDevice.Viewport.Height == 768))
                        {
                            int temp = menucomp.palla1 / (GraphicsDevice.Viewport.Width / 21);
                            int temp2 = menucomp.palla2 / (GraphicsDevice.Viewport.Width / 21);
                            Game1.graphics.PreferredBackBufferWidth = 1280;
                            Game1.graphics.PreferredBackBufferHeight = 1024;
                            Game1.graphics.ApplyChanges();
                            menucomp.risoluz = 2;
                            menucomp.palla1 = 0 + (GraphicsDevice.Viewport.Width / 21) * temp;
                            menucomp.palla2 = 0 + (GraphicsDevice.Viewport.Width / 21) * temp2;
                        }
                        if ((GraphicsDevice.Viewport.Width == 800) && (GraphicsDevice.Viewport.Height == 600))
                        {
                            int temp = menucomp.palla1 / (GraphicsDevice.Viewport.Width / 21);
                            int temp2 = menucomp.palla2 / (GraphicsDevice.Viewport.Width / 21);
                            Game1.graphics.PreferredBackBufferWidth = 1024;
                            Game1.graphics.PreferredBackBufferHeight = 768;
                            Game1.graphics.ApplyChanges();
                            menucomp.risoluz = 1;
                            menucomp.palla1 = 0 + (GraphicsDevice.Viewport.Width / 21) * temp;
                            menucomp.palla2 = 0 + (GraphicsDevice.Viewport.Width / 21) * temp2;
                        }

                    }
                }
                else
                #endif

                 #if WINDOWS
                    //dx audio menù
                if ((InputManagerG.InputManagerGame.GetState().mouseY < ((int)(GraphicsDevice.Viewport.Height / 4.6f) + (int)(GraphicsDevice.Viewport.Height / 5.3f))) && (InputManagerG.InputManagerGame.GetState().mouseY > ((int)(GraphicsDevice.Viewport.Height / 4.6f))))
                    #elif WINDOWS_PHONE
                    if ((InputManagerG.InputManagerGame.GetState().mouseY < ((int)(GraphicsDevice.Viewport.Height / 3.6f) + (int)(GraphicsDevice.Viewport.Height / 5.3f))) && (InputManagerG.InputManagerGame.GetState().mouseY > ((int)(GraphicsDevice.Viewport.Height / 3.6f))))
#endif
                {
                    dx1 = true;
                    if (menucomp.SongVol < 0.9f)
                        if (InputManagerG.InputManagerGame.GetState().click)
                        {
                            menucomp.SongVol = menucomp.SongVol + 0.1f;
                            menucomp.palla1 = menucomp.palla1 + (GraphicsDevice.Viewport.Width / 21);
                        }
                }
                else
                    //dx audio game
#if WINDOWS
                    if ((InputManagerG.InputManagerGame.GetState().mouseY < ((int)(GraphicsDevice.Viewport.Height / 2.2f) + (int)(GraphicsDevice.Viewport.Height / 5.3f))) && (InputManagerG.InputManagerGame.GetState().mouseY > ((int)(GraphicsDevice.Viewport.Height / 2.2f))))
                                    #elif WINDOWS_PHONE
                         if ((InputManagerG.InputManagerGame.GetState().mouseY < ((int)(GraphicsDevice.Viewport.Height / 1.7f) + (int)(GraphicsDevice.Viewport.Height / 5.3f))) && (InputManagerG.InputManagerGame.GetState().mouseY > ((int)(GraphicsDevice.Viewport.Height / 1.7f))))
#endif
                    {
                    dx2 = true;
                    if (menucomp.SongG < 0.9f)
                        if (InputManagerG.InputManagerGame.GetState().click)
                        {
                            menucomp.SongG = menucomp.SongG + 0.1f;
                            menucomp.palla2 = menucomp.palla2 + (GraphicsDevice.Viewport.Width / 21);

                        }
                }
               


            }
            if ((InputManagerG.InputManagerGame.GetState().mouseX < ((int)(GraphicsDevice.Viewport.Width / 8.3f) + (int)(GraphicsDevice.Viewport.Width / 7.0f))) && (InputManagerG.InputManagerGame.GetState().mouseX > (int)(GraphicsDevice.Viewport.Width / 8.3f)))
            {
                #if WINDOWS
                //sx risoluzione
                if ((InputManagerG.InputManagerGame.GetState().mouseY < ((int)(GraphicsDevice.Viewport.Height / 1.45f) + (int)(GraphicsDevice.Viewport.Height / 5.3f))) && (InputManagerG.InputManagerGame.GetState().mouseY > ((int)(GraphicsDevice.Viewport.Height / 1.45f))))
                {
                    sx3 = true;
                    if (InputManagerG.InputManagerGame.GetState().click)
                    {
                        if ((GraphicsDevice.Viewport.Width == 1024) && (GraphicsDevice.Viewport.Height == 768))
                        {
                            int temp = menucomp.palla1 / (GraphicsDevice.Viewport.Width / 21);
                            int temp2 = menucomp.palla2 / (GraphicsDevice.Viewport.Width / 21);
                            Game1.graphics.PreferredBackBufferWidth = 800;
                            Game1.graphics.PreferredBackBufferHeight = 600;
                            Game1.graphics.ApplyChanges();
                            menucomp.risoluz = 0;
                            menucomp.palla1 = 0 + (GraphicsDevice.Viewport.Width / 21) * temp;
                            menucomp.palla2 = 0 + (GraphicsDevice.Viewport.Width / 21) * temp2;
                        }
                        if ((GraphicsDevice.Viewport.Width == 1280) && (GraphicsDevice.Viewport.Height == 1024))
                        {
                            int temp = menucomp.palla1 / (GraphicsDevice.Viewport.Width / 21);
                            int temp2 = menucomp.palla2 / (GraphicsDevice.Viewport.Width / 21);
                            Game1.graphics.PreferredBackBufferWidth = 1024;
                            Game1.graphics.PreferredBackBufferHeight = 768;
                            Game1.graphics.ApplyChanges();
                            menucomp.risoluz = 1;
                            menucomp.palla1 = 0 + (GraphicsDevice.Viewport.Width / 21) * temp;
                            menucomp.palla2 = 0 + (GraphicsDevice.Viewport.Width / 21) * temp2;
                        }
                    }
                }
                else
                #endif
                //sx audio menù
                    #if WINDOWS
                if ((InputManagerG.InputManagerGame.GetState().mouseY < ((int)(GraphicsDevice.Viewport.Height / 4.6f) + (int)(GraphicsDevice.Viewport.Height / 5.3f))) && (InputManagerG.InputManagerGame.GetState().mouseY > ((int)(GraphicsDevice.Viewport.Height / 4.6f))))
                                    #elif WINDOWS_PHONE
                     if ((InputManagerG.InputManagerGame.GetState().mouseY < ((int)(GraphicsDevice.Viewport.Height / 3.6f) + (int)(GraphicsDevice.Viewport.Height / 5.3f))) && (InputManagerG.InputManagerGame.GetState().mouseY > ((int)(GraphicsDevice.Viewport.Height / 3.6f))))
#endif
                {
                    sx1 = true;
                    if (menucomp.SongVol > 0.1f)
                        if (InputManagerG.InputManagerGame.GetState().click)
                        {
                            menucomp.SongVol = menucomp.SongVol - 0.1f;
                            menucomp.palla1 = menucomp.palla1 - (GraphicsDevice.Viewport.Width / 21);
                        }
                }
                else
                //sx audio game
                    #if WINDOWS
                if ((InputManagerG.InputManagerGame.GetState().mouseY < ((int)(GraphicsDevice.Viewport.Height / 2.2f) + (int)(GraphicsDevice.Viewport.Height / 5.3f))) && (InputManagerG.InputManagerGame.GetState().mouseY > ((int)(GraphicsDevice.Viewport.Height / 2.2f))))
                                    #elif WINDOWS_PHONE
                    if ((InputManagerG.InputManagerGame.GetState().mouseY < ((int)(GraphicsDevice.Viewport.Height / 1.7f) + (int)(GraphicsDevice.Viewport.Height / 5.3f))) && (InputManagerG.InputManagerGame.GetState().mouseY > ((int)(GraphicsDevice.Viewport.Height / 1.7f))))
#endif
                {
                    sx2 = true;
                    if (menucomp.SongG > 0.1f)
                        if (InputManagerG.InputManagerGame.GetState().click)
                        {
                            menucomp.SongG = menucomp.SongG - 0.1f;
                            menucomp.palla2 = menucomp.palla2 - (GraphicsDevice.Viewport.Width / 21);
                        }
                }
            }


            #if WINDOWS
            //torno nel menù
            if (InputManagerG.InputManagerGame.GetState().Back)
            {
                songI.Stop();
                while (Game.Components.Count > 0)
                {
                    ((GameComponent)Game.Components[0]).Dispose();
                }

                Game.Components.Clear();

                Game.Components.Add(new menu(Game));
                Game.Components.Add(new InputManagerG.InputManagerGame(Game));
            }
            #endif

            base.Update(gameTime);
        }

        public override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.Violet);
            spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend);
            //SFONDO e PALLINA
            if (menucomp.risoluz == 0)
            {
                #if WINDOWS
                spriteBatch.Draw(sfondoOpz800600, new Rectangle(0, 0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height), new Rectangle(0, 0, 1280, 1024), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 1.0f);
                spriteBatch.Draw(pallina, new Rectangle((int)(GraphicsDevice.Viewport.Width / 2.1f + menucomp.palla1), (int)(GraphicsDevice.Viewport.Height / 3.95f), (int)(GraphicsDevice.Viewport.Width / 9.0f), (int)(GraphicsDevice.Viewport.Height / 8.3f)), new Rectangle(234, 96, 115, 116), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
                spriteBatch.Draw(pallina, new Rectangle((int)(GraphicsDevice.Viewport.Width / 2.1f + menucomp.palla2), (int)(GraphicsDevice.Viewport.Height / 2.03f), (int)(GraphicsDevice.Viewport.Width / 9.0f), (int)(GraphicsDevice.Viewport.Height / 8.3f)), new Rectangle(234, 96, 112, 116), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
                #elif WINDOWS_PHONE
                spriteBatch.Draw(sfondoOpz, new Rectangle(0, 0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height), new Rectangle(0, 0, 800, 480), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 1.0f);
                spriteBatch.Draw(pallina, new Rectangle((int)(GraphicsDevice.Viewport.Width / 2.1f + menucomp.palla1), (int)(GraphicsDevice.Viewport.Height / 3.32f), (int)(GraphicsDevice.Viewport.Width / 9.0f), (int)(GraphicsDevice.Viewport.Height / 8.3f)), new Rectangle(234, 96, 115, 116), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
                spriteBatch.Draw(pallina, new Rectangle((int)(GraphicsDevice.Viewport.Width / 2.1f + menucomp.palla2), (int)(GraphicsDevice.Viewport.Height / 1.58f), (int)(GraphicsDevice.Viewport.Width / 9.0f), (int)(GraphicsDevice.Viewport.Height / 8.3f)), new Rectangle(234, 96, 112, 116), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
                #endif

            }
            else
                if (menucomp.risoluz == 1)
                {
                    #if WINDOWS
                    spriteBatch.Draw(sfondoOpz1024768, new Rectangle(0, 0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height), new Rectangle(0, 0, 1280, 1024), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 1.0f);
                    spriteBatch.Draw(pallina, new Rectangle((int)(GraphicsDevice.Viewport.Width / 2.13f + menucomp.palla1), (int)(GraphicsDevice.Viewport.Height / 3.95f), (int)(GraphicsDevice.Viewport.Width / 9.0f), (int)(GraphicsDevice.Viewport.Height / 8.3f)), new Rectangle(234, 96, 115, 116), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
                    spriteBatch.Draw(pallina, new Rectangle((int)(GraphicsDevice.Viewport.Width / 2.13f + menucomp.palla2), (int)(GraphicsDevice.Viewport.Height / 2.03f), (int)(GraphicsDevice.Viewport.Width / 9.0f), (int)(GraphicsDevice.Viewport.Height / 8.3f)), new Rectangle(234, 96, 115, 116), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
                    #endif
                }
                else
                {
                    #if WINDOWS
                    spriteBatch.Draw(sfondoOpz12801024, new Rectangle(0, 0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height), new Rectangle(0, 0, 1280, 1024), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 1.0f);
                    spriteBatch.Draw(pallina, new Rectangle((int)(GraphicsDevice.Viewport.Width / 2.16f + menucomp.palla1), (int)(GraphicsDevice.Viewport.Height / 3.95f), (int)(GraphicsDevice.Viewport.Width / 9.0f), (int)(GraphicsDevice.Viewport.Height / 8.3f)), new Rectangle(234, 96, 115, 116), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
                    spriteBatch.Draw(pallina, new Rectangle((int)(GraphicsDevice.Viewport.Width / 2.16f + menucomp.palla2), (int)(GraphicsDevice.Viewport.Height / 2.03f), (int)(GraphicsDevice.Viewport.Width / 9.0f), (int)(GraphicsDevice.Viewport.Height / 8.3f)), new Rectangle(234, 96, 115, 116), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
                    #endif
                }
            //PULSANTI
            #if WINDOWS
            if (dx1 == true)
                spriteBatch.Draw(dxs, new Rectangle(GraphicsDevice.Viewport.Width - GraphicsDevice.Viewport.Width / 4, (int)(GraphicsDevice.Viewport.Height / 4.6f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            else
                spriteBatch.Draw(dx, new Rectangle(GraphicsDevice.Viewport.Width - GraphicsDevice.Viewport.Width / 4, (int)(GraphicsDevice.Viewport.Height / 4.6f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            if (sx1 == true)
                spriteBatch.Draw(sxs, new Rectangle((int)(GraphicsDevice.Viewport.Width / 8.3f), (int)(GraphicsDevice.Viewport.Height / 4.6f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            else
                spriteBatch.Draw(sx, new Rectangle((int)(GraphicsDevice.Viewport.Width / 8.3f), (int)(GraphicsDevice.Viewport.Height / 4.6f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            
            if (dx2 == true)
                spriteBatch.Draw(dxs, new Rectangle(GraphicsDevice.Viewport.Width - GraphicsDevice.Viewport.Width / 4, (int)(GraphicsDevice.Viewport.Height / 2.2f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            else
                spriteBatch.Draw(dx, new Rectangle(GraphicsDevice.Viewport.Width - GraphicsDevice.Viewport.Width / 4, (int)(GraphicsDevice.Viewport.Height / 2.2f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            if (sx2 == true)
                spriteBatch.Draw(sxs, new Rectangle((int)(GraphicsDevice.Viewport.Width / 8.3f), (int)(GraphicsDevice.Viewport.Height / 2.2f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            else
                spriteBatch.Draw(sx, new Rectangle((int)(GraphicsDevice.Viewport.Width / 8.3f), (int)(GraphicsDevice.Viewport.Height / 2.2f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            
            if (dx3 == true)
                spriteBatch.Draw(dxs, new Rectangle(GraphicsDevice.Viewport.Width - GraphicsDevice.Viewport.Width / 4, (int)(GraphicsDevice.Viewport.Height / 1.45f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            else
                spriteBatch.Draw(dx, new Rectangle(GraphicsDevice.Viewport.Width - GraphicsDevice.Viewport.Width / 4, (int)(GraphicsDevice.Viewport.Height / 1.45f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            if (sx3 == true)
                spriteBatch.Draw(sxs, new Rectangle((int)(GraphicsDevice.Viewport.Width / 8.3f), (int)(GraphicsDevice.Viewport.Height / 1.45f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            else
                spriteBatch.Draw(sx, new Rectangle((int)(GraphicsDevice.Viewport.Width / 8.3f), (int)(GraphicsDevice.Viewport.Height / 1.45f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            #elif WINDOWS_PHONE
            if (dx1 == true)
                spriteBatch.Draw(dxs, new Rectangle(GraphicsDevice.Viewport.Width - GraphicsDevice.Viewport.Width / 4, (int)(GraphicsDevice.Viewport.Height / 3.6f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            else
                spriteBatch.Draw(dx, new Rectangle(GraphicsDevice.Viewport.Width - GraphicsDevice.Viewport.Width / 4, (int)(GraphicsDevice.Viewport.Height / 3.6f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            if (sx1 == true)
                spriteBatch.Draw(sxs, new Rectangle((int)(GraphicsDevice.Viewport.Width / 8.3f), (int)(GraphicsDevice.Viewport.Height / 3.6f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            else
                spriteBatch.Draw(sx, new Rectangle((int)(GraphicsDevice.Viewport.Width / 8.3f), (int)(GraphicsDevice.Viewport.Height / 3.6f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            
            if (dx2 == true)
                spriteBatch.Draw(dxs, new Rectangle(GraphicsDevice.Viewport.Width - GraphicsDevice.Viewport.Width / 4, (int)(GraphicsDevice.Viewport.Height / 1.7f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            else
                spriteBatch.Draw(dx, new Rectangle(GraphicsDevice.Viewport.Width - GraphicsDevice.Viewport.Width / 4, (int)(GraphicsDevice.Viewport.Height / 1.7f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            if (sx2 == true)
                spriteBatch.Draw(sxs, new Rectangle((int)(GraphicsDevice.Viewport.Width / 8.3f), (int)(GraphicsDevice.Viewport.Height / 1.7f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            else
                spriteBatch.Draw(sx, new Rectangle((int)(GraphicsDevice.Viewport.Width / 8.3f), (int)(GraphicsDevice.Viewport.Height / 1.7f), (int)(GraphicsDevice.Viewport.Width / 7.0f), (int)(GraphicsDevice.Viewport.Height / 5.3f)), new Rectangle(208, 66, 175, 155), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);

#endif

            if (bk == true)
                spriteBatch.Draw(backs, new Rectangle((int)(GraphicsDevice.Viewport.Width / 42.5f), GraphicsDevice.Viewport.Height / 2 + (int)(GraphicsDevice.Viewport.Height / 2.8f), (int)(GraphicsDevice.Viewport.Width / 3.5f), GraphicsDevice.Viewport.Height / 8), new Rectangle(80, 60, 440, 150), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);
            else
                spriteBatch.Draw(back, new Rectangle((int)(GraphicsDevice.Viewport.Width / 42.5f), GraphicsDevice.Viewport.Height / 2 + (int)(GraphicsDevice.Viewport.Height / 2.8f), (int)(GraphicsDevice.Viewport.Width / 3.5f), GraphicsDevice.Viewport.Height / 8), new Rectangle(80, 60, 440, 150), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.5f);

#if WINDOWS
            spriteBatch.Draw(mirino, new Vector2(InputManagerG.InputManagerGame.inputState.mouseX - mirino.Width * 0.5f, InputManagerG.InputManagerGame.inputState.mouseY - mirino.Height * 0.5f), Color.White);
#endif
            spriteBatch.End();
            base.Draw(gameTime);
        }


        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
        }
    }
}
